<span id="${uuid}"></span>
<div class="box_tc_s">
    <form data-id="form-device-info" method="post"
          action="${pageContext.request.contextPath}/app/api/device/updateDevice"
          name="form-device-add">
        <input type="hidden" value="${device.id}" name="id"/>
        <table border="0" cellpadding="0" cellspacing="0" class="hydra-table">
            <tr class="hydra-tr-bg">
                <td class="hydra-left">设备名称：</td>
                <td class="hydra-right"><input type="text" data-id="deviceName"
                                               name="deviceName" class="easyui-validatebox hydra-input-width"
                                               data-options="required:true,validType:['normalChar','length[0,20]']"
                                               placeholder="设备名称.." value="${device.deviceName}"/></td>
            </tr>
            <tr class="hydra-tr-bg">
                <td class="hydra-left">设备编码：</td>
                <td class="hydra-right">
                    <input type="text" data-id="deviceCode"
                           name="deviceCode" class="easyui-validatebox hydra-input-width" required="true"
                           data-options="validType:['length[0,20]']"
                           placeholder="编码必须填写.." value="${device.deviceCode}"/></td>
            </tr>
            <tr>
                <td class="hydra-left">操作者:</td>
                <td class="hydra-right">
                    <input data-id="operators" name="operators"
                           placeholder="操作者" value="${device.operators}"
                           class="easyui-validatebox hydra-input-width" />
                </td>
            </tr>
            <tr>
                <td class="hydra-left">设备封面</td>
                <td class="hydra-right">
                    <input type="text" data-id="uploadCover" name="deviceCover" value="${device.deviceCover}" />
                </td>
            </tr>
            <tr class="hydra-tr-bg">
                <td class="hydra-left">生产厂家：</td>
                <td class="hydra-right"><input type="text" data-id="manufacturer"
                                               class="easyui-validatebox hydra-input-width"
                                               data-options="required:true,validType:['length[0,20]']" name="manufacturer"
                                               placeholder="生产厂家.." value="${device.manufacturer}"/></td>
            </tr>
            <tr>
                <td class="hydra-left">购买日期：</td>
                <td class="hydra-right">
                    <input type="text" data-id="purchaseDate"
                           class="easyui-validatebox hydra-input-width"
                           data-options="editable:false" name="purchaseDate"
                           placeholder="购买日期.." value="${device.purchaseDate}"/></td>
            </tr>
            <tr>
                <td class="hydra-left">购买金额：</td>
                <td class="hydra-right">
                    <input type="text" data-id="purchaseAmount"
                           name="purchaseAmount" class="easyui-numberbox easyui-validatebox hydra-input-width"
                           value="${device.purchaseAmount}" data-options="required:true,min:0,precision:2" placeholder="购买金额.."/>
                </td>
            </tr>
            <tr class="hydra-tr-bg">
                <td class="hydra-left">主要参数：</td>
                <td class="hydra-right">
                    <textarea data-id="keyParameter" name="keyParameter"
                              placeholder="主要参数" data-options="validType:['length[0,200]']"
                              class="easyui-validatebox hydra-input-width hydra-textarea">${device.keyParameter}</textarea>
                </td>
            </tr>
            <tr>
                <td class="hydra-left">维修记录:</td>
                <td class="hydra-right">
                    <textarea data-id="repairRecord" name="repairRecord"
                              placeholder="维修记录" data-options="validType:['normalChar','length[0,200]']"
                              class="easyui-validatebox hydra-input-width hydra-textarea">${device.repairRecord}</textarea>
                </td>
            </tr>
            <tr>
                <td class="hydra-left">是否程控设备:</td>
                <td class="hydra-right">
                    <input type="checkbox" data-id="parserDevice" name="parserDevice" <c:if test="${device.parserDevice eq '1'}">checked</c:if>/>
                </td>
            </tr>
            <tr data-id="parser-box">
                <td class="hydra-left">选择程控解析器:</td>
                <td>
                    <select data-id="parser" name="parser" class="hydra-input-width">
                        <c:forEach items="${parsers}" var="parser">
                            <option value="${parser.code}">${parser.title}</option>
                        </c:forEach>
                    </select>
                </td>
            </tr>
        </table>
    </form>
</div>
<script type="text/javascript">

    seajs.use(["apps/device/main"], function (page) {
        page.update("${pageContext.request.contextPath}", "${uuid}", {
            parser:"${device.parser}"
        });
    });

</script>